home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / clean / sun3.lha / Sun3 / deltaI.dcl < prev    next >
Text File  |  1992-08-07  |  1KB  |  38 lines

  1. SYSTEM MODULE deltaI;
  2.  
  3. ==    Version 0.8
  4.  
  5. ==
  6. ==    Integer operations
  7. ==
  8.  
  9. RULE
  10.  
  11. ::    +    !INT    !INT            ->    INT;        ==    add arg1 to arg2    
  12. ::    -    !INT    !INT            ->    INT;        ==    subtract arg2 from arg1
  13. ::    *    !INT    !INT            ->    INT;        ==    multiply arg1 with arg2
  14. ::    /    !INT    !INT            ->    INT;        ==    divide arg1 by arg2
  15. ::    %    !INT    !INT            ->    INT;        ==    modulo arg1 by arg2
  16. ::    ++    !INT                    ->    INT;        ==    increment arg1 with 1
  17. ::    --    !INT                    ->    INT;        ==    decrement arg1 with 1
  18. ::    =    !INT    !INT            ->    BOOL;        ==    true if arg1 equals arg2
  19. ::    <>    !INT    !INT            ->    BOOL;        ==    true if arg1 does not equal arg2
  20. ::    <    !INT    !INT            ->    BOOL;        ==    true if arg1 is less the arg2
  21. ::    >    !INT    !INT            ->    BOOL;        ==    true if arg1 is more then arg2
  22. ::    <=    !INT    !INT            ->    BOOL;        ==    true if arg1 is less or equal to 
  23.                                                 ==    arg2
  24. ::    >=    !INT    !INT            ->    BOOL;        ==    true if arg1 is more or equal to 
  25.                                                 ==    arg2
  26. ::    AND%    !INT    !INT        ->    INT;        ==    bitwise and of arg1 and arg2
  27. ::    OR%        !INT    !INT        ->    INT;        ==    bitwise or of arg1 and arg2
  28. ::    XOR%    !INT    !INT        ->    INT;        ==    exclusive-or arg1 with mask arg2
  29. ::    SHIFTL%    !INT    !INT        ->    INT;        ==    shift arg1 to the left arg2 bit places
  30. ::    SHIFTR%    !INT    !INT        ->    INT;        ==    shift arg1 to the right arg2 bit places
  31. ::    NOT%    !INT                ->    INT;        ==    one's complement of arg1
  32.  
  33. ::    ITOC    !INT                ->    CHAR;        ==    convert integer to CHAR
  34. ::    ITOR    !INT                ->    REAL;        ==    convert integer to REAL
  35. ::    ITOS    !INT                ->    STRING;        ==    convert integer to STRING
  36.  
  37. ::    RANDOM                        ->    INT;        ==    returns a random integer
  38.